<div class="dux-page-header uk-clearfix">
    <div class="page-title">
        <a class="uk-button uk-button-primary" href="{url('index')}"> 退款列表</a>
    </div>
</div>

<div class="uk-margin-top">
    <table class="uk-table  uk-table-responsive  uk-table-striped uk-table-hover uk-table-middle dux-table">
        <thead>
        <tr>
            <th colspan="2">退货商品</th>
            <th>付款金额</th>
            <!--if{$info.delivery_name && $info.delivery_no}-->
            <th>退货快递</th>
            <!--{/if}-->
            <th width="120" class="uk-text-center">状态</th>
        </tr>
        </thead>

        <tbody>
        <tr>
            <td width="70">
                <a href="{$info.goods_url}" target="_blank" class="uk-float-left">
                    <img src="{$info.goods_image}" width="60" height="60">
                </a>
            </td>
            <td>
                <div><a href="{$info.goods_url}" target="_blank" class="link">{$info.goods_name}</a>
                </div>
                <div class="dux-text-disabled">
                    <!--loop{(array)$vo.goods_options as $v}-->
                    {$v.value}
                    <!--{/loop}-->
                </div>
                <p>单价:{$info.goods_price} x {$info.goods_qty}</p>
            </td>
            <td>
                ￥{$info.price_total}
            </td>
            <!--if{$info.delivery_name && $info.delivery_no}-->
            <td>

                <a href="https://www.kuaidi100.com/chaxun?nu={$info.delivery_no}" target="_blank">{$info.delivery_name}</a>
                <p>{$info.delivery_no}</p>
            </td>
            <!--{/if}-->
            <td class="uk-text-center">
                <span class="uk-text-{$info.status_data.color}">{$info.status_data.title}</span>
            </td>
        </tr>
        </tbody>
    </table>

</div>
    <br>
    <div class="uk-grid">
        <div class="uk-width-1-2@l">
            <table class="uk-table  uk-table-responsive  uk-table-striped uk-table-hover uk-table-middle dux-table dux-table dux-table-lg">
                <thead>
                <tr>
                    <th>申请信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>退款单号: {$info.refund_no}</td>
                </tr>
                <tr>
                    <td>退款类型: {$info.type_title}</td>
                </tr>
                <tr>
                    <td>申请时间: {date('Y-m-d H:i:s', $info.create_time)}</td>
                </tr>
                <tr>
                    <td>退款用户: <a data-dux="dialog-open" data-url="{url('member/MemberUser/dialogUser', ['id' => $vo.user_id])}"
                                 data-title="用户信息" data-height="250px" href="javascript:;">{$info.user_nickname}({$info.user_tel})</a>
                    </td>
                </tr>
                <tr>
                    <td>退款金额: <span class="uk-text-danger">{$info.price}</span> 运费：<span class="uk-text-danger">{$info.delivery_price}</span></td>
                </tr>
                <tr>
                    <td>退款原因: {$info.cause}</td>
                </tr>
                <tr>
                    <td>退款描述: {$info.content ? $info.content : '无'}</td>
                </tr>
                <!--if{$info.images}-->
                <tr>
                    <td>
                        <!--loop{$info.images as $image}-->
                        <a href="{$image}" target="_blank"><img src="{$image}" width="60" height="60"></a>
                        <!--{/loop}-->
                    </td>
                </tr>
                <!--{/if}-->
                </tbody>
            </table>
        </div>
        <div class="uk-width-1-2@l">
            <table class="uk-table  uk-table-responsive  uk-table-striped uk-table-hover uk-table-middle dux-table dux-table dux-table-lg">
                <thead>
                <tr>
                    <th colspan="3">订单信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>订单号: <a href="{url($orderInfo.order_app . '/Order/index', ['keyword' => $orderInfo.order_no])}"
                                target="_blank">{$orderInfo.order_no}</a></td>
                </tr>
                <tr>
                    <td>订单已退款:
                        <span class="">{$orderInfo.refund_price}</span>
                    </td>
                </tr>
                <tr>
                    <td>订单已优惠:
                        <span class="">{$orderInfo.pay_discount}</span>
                    </td>
                </tr>

                <tr>
                    <td>订单实付:
                        <span class="">{$orderInfo.pay_price}</span>
                    </td>
                </tr>
                <tr>
                    <td>订单运费:
                        <span class="">{$orderInfo.delivery_price}</span>
                    </td>
                </tr>
                <tr>
                    <td>可退款总额:
                        <span class="uk-text-danger">{$orderInfo.balance_price}</span>
                    </td>
                </tr>
                <tr>
                    <td>收货姓名: {$orderInfo.receive_name}</td>
                </tr>
                <tr>
                    <td>收货电话: {$orderInfo.receive_tel}</td>
                </tr>
                <tr>
                    <td>收货地址: {$orderInfo.receive_province} {$orderInfo.receive_city} {$orderInfo.receive_region}
                        {$orderInfo.receive_address}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>

    <br>


<div class="uk-margin-top">
    <table class="uk-table  uk-table-responsive  uk-table-striped uk-table-hover uk-table-middle dux-table">
        <thead>
        <tr>
            <th colspan="2">订单商品</th>
            <th>状态</th>
            <th>单价</th>
            <th>优惠</th>
            <th width="150">小计</th>
        </tr>
        </thead>
        <tbody>
        <!--loop{$orderGoods as $vo}-->
        <tr>
            <td width="90">
                <a href="{$vo.goods_url}" target="_blank">
                    <img src="{$vo.goods_image}" alt="" width="80" height="80">
                </a>
            </td>
            <td>
                <a target="_blank" href="{$vo.goods_url}">{$vo.goods_name}</a> x {$vo.goods_qty}
                <div>
                    重量:{$vo.weight/1000}kg
                    <!--if{!empty($vo.goods_options)}-->
                    <!--loop{$vo.goods_options as $v}-->
                    {$v.name}:{$v.value}
                    <!--{/loop}-->
                    <!--{/if}-->
                </div>
            </td>
            <td>
                <!--if{!$vo.service_status}-->
                正常
                <!--{/if}-->
                <!--if{$vo.service_status == 1}-->
                <span class="uk-text-warning">退款/退货中</span>
                <!--{/if}-->
                <!--if{$vo.service_status == 2}-->
                <span class="uk-text-danger">已退款/退回</span>
                <!--{/if}-->
            </td>
            <td>￥{$vo.goods_price}</td>
            <td>￥{$vo.price_discount}</td>
            <td>￥{$vo.price_total}</td>
        </tr>
        <!--{/loop}-->

        </tbody>
    </table>
    <br>

    <!--if{$info.status == 1}-->
    <div class="uk-card uk-card-default uk-card-small dux-panel">
        <div class="uk-card-header">处理操作</div>
        <div class="uk-card-body">
            <form class="dux-form uk-form   uk-form-horizontal " data-dux="form-bind" method="post">
                <fieldset>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">处理意见</label>
                        <div class="uk-form-controls">
                            <select name="status">
                                <option value="1">
                                     {$info.type ? '同意退货' : '同意退款'}
                                </option>
                                <option value="0">
                                    {$info.type ? '拒绝退货' : '拒绝退款'}
                                </option>
                            </select>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">处理原因</label>
                        <div class="uk-form-controls">
                            <textarea name="remark" placeholder="可选处理原因"></textarea>
                        </div>
                    </div>
                    <input type="hidden" name="id" value="{$info.refund_id}">
                    <div class="uk-form-group">
                        <label class=" uk-form-label"></label>
                        <div class="uk-form-controls">
                            <button type="submit" class="uk-button uk-button-primary">确认处理</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
    <!--{/if}-->

    <!--if{$info.status == 2}-->
    <div class="uk-card uk-card-default uk-card-small dux-panel">
        <div class="uk-card-header">处理操作</div>
        <div class="uk-card-body">
            <form class="dux-form uk-form   uk-form-horizontal " data-dux="form-bind" method="post">
                <fieldset>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">处理意见</label>
                        <div class="uk-form-controls">
                            <select name="status">
                                <option value="1">
                                    同意退款
                                </option>
                                <option value="0">
                                    拒绝退款
                                </option>
                            </select>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">处理原因</label>
                        <div class="uk-form-controls">
                            <textarea name="remark" placeholder="可选处理原因"></textarea>
                        </div>
                    </div>
                    <input type="hidden" name="id" value="{$info.refund_id}">
                    <div class="uk-form-group">
                        <label class=" uk-form-label"></label>
                        <div class="uk-form-controls">
                            <button type="submit" class="uk-button uk-button-primary">确认处理</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
    <!--{/if}-->

</div>